/**
 * @ProjectName:schoolbus
 * @FileName: SchoolBusLogServiceImpl.java
 * @PackageName: edu.xpu.project.log.service
 * @Company:北京有生博大软件有限公司（西安分公司）
 * @Copyright (c) 2017,RiseSoft  All Rights Reserved.
 * @date 2017年5月26日 下午2:09:52
 */
package edu.xpu.project.log.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import edu.xpu.project.log.entity.SchoolBusLog;
import edu.xpu.project.log.repository.SchoolBusLogRepository;

/**
 * @ClassName: SchoolBusLogServiceImpl.java
 * @Description: SchoolBusLogService的业务实现类
 *
 * @author liukang
 * @date 2017年5月26日 下午2:09:52
 * @version 
 * @since JDK 1.6
 */
@Service
@Transactional(readOnly=true)
public class SchoolBusLogServiceImpl implements SchoolBusLogService {
	@Autowired
	private SchoolBusLogRepository busLogRepository;

	@Override
	public SchoolBusLog get(Long id) {
		SchoolBusLog one = busLogRepository.getOne(id);
		return one;
	}

	@Transactional(readOnly=false)
	@Override
	public SchoolBusLog saveOrUpdate(SchoolBusLog t) {
		SchoolBusLog saveAndFlush = busLogRepository.saveAndFlush(t);
		return saveAndFlush;
	}

	@Transactional(readOnly=false)
	@Override
	public void delete(Long id) {
		busLogRepository.delete(id);
	}

}

